﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using BusinessObjects;

namespace DataObjects
{
    /// <summary>
    /// Defines methods to access categories.
    /// </summary>
    /// <remarks>
    /// This is a database-independent interface. Implementations are database specific.
    /// </remarks>
    public interface ICategoryDao
    {
        /// <summary>
        /// Gets a list of product categories.
        /// </summary>
        /// <returns>List of product categories.</returns>
        List<Category> GetCategories();

        Category GetCategory(int categoryID);
        ///// <summary>
        ///// Gets a product category for a given product.
        ///// </summary>
        ///// <param name="productId">Unique product identifier.</param>
        ///// <returns>Product category.</returns>
        //Category GetCategoryByProduct(int productId);

        /// <summary>
        /// Gets a categoryId for a given product.
        /// </summary>
        /// <param name="productId">Unique product identifier.</param>
        /// <returns>CategoryId.</returns>
        int GetCategoryByProduct(int productId);
        List<Category> SearchCategories(DateTime DateFrom, DateTime DateTo, int firstPoint, int lastPoint, int supplierId, int trafficId, string sortExpression);
        void InsertCategory(Category category);
        void UpdateCategory(Category category);
        void DeleteCategory(Category category);
    }
}
